#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
  int n,j,i;
  scanf("%d",&n);
  n--;
  for(i=-n;i<=n;i++)
  {
      for(j=1;j<=abs(i);j++) printf(" ");
      for(j=-(n-abs(i));j<=n-abs(i);j++)
        printf("%d",n+1-abs(i)-abs(j));
      printf("\n");
  }
}
